package com.yonyou.brigade.order_center.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.service.IService;
import com.yonyou.brigade.order_center.model.BriHotelOrder;
import com.yonyou.brigade.order_center.model.CnvHotelOrderDO;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jiangzhf@yonyou.com
 * @since 2018-06-14
 */
public interface IBriHotelOrderService extends IService<BriHotelOrder> {
    List<BriHotelOrder> getBriHotelOrder(Map params);

    List<CnvHotelOrderDO> getCnvHotelOrderDos(Map<String, String> params, Date beginDate, Date endDate);

    List<BriHotelOrder> getBriHotelOrderByDepartureDate(Map<String, String> params, Date beginDate, Date endDate);

    void updateIsNoteByOrderId(int orderId);

    public void updateIsBxStateByOrderIds(List<Integer> ids,int bxState);

    List<CnvHotelOrderDO> getCnvFlightOrderDosWithIds(Map<String, String> params,String ids);

    public List<BriHotelOrder> getOrdersByRelateYBZId(List<String> ybzIds);

    List<BriHotelOrder> getHotelOrdersByTimeRange(String tenantId, Date begin, Date end);

    JSONObject getHotelOrderJson(JSONObject params);

    /**
     * 获取酒店订单详情
     * @param tenant
     * @param orderNo
     * @return
     */
    BriHotelOrder getHotelOrderJson(String tenant, String orderNo);

    CnvHotelOrderDO getBriHotelOrderByOrderNo(String orderNo);

    /**
     * 根据订单编号获取订单信息
     * @param orderNo
     * @param fromType
     * @return
     */
    List<CnvHotelOrderDO> getOrderLikeOrderNo(String orderNo, String fromType, String tenant);

    /**
     * 根据获取订单的原单和退改单
     * @param orderNo
     * @param parentNo
     * @param fromType
     * @return
     */
    List<CnvHotelOrderDO> getRelationOrders(String orderNo, String parentNo, String fromType, String tenant);

    /**
     * 根据获取订单的原单和退改单
     * @param orderNo
     * @param parentNo
     * @param fromType
     * @return
     */
    List<BriHotelOrder> getRelationOrdersV2(String orderNo, String parentNo, String fromType, String tenant);

    JSONArray getHotelOrders(String userId, String bxState, String beginDate, String endDate, String tenant, Map<String, List<Map<String, String>>> canBeSeen);

    JSONArray getHotelOrders(String tenant, String orderNo);

    List<BriHotelOrder> getHotelOrdersByBxState(String userId, String bxState, String beginDate, String endDate, String tenant, Map<String, List<Map<String, String>>> canBeSeen);
}
